<?php
// +----------------------------------------------------------------------
// | Created by PhpStorm
// +----------------------------------------------------------------------
// | Date: 2020/6/22 10:35
// +----------------------------------------------------------------------
// | Use : 说明用途，主要方面！
// +----------------------------------------------------------------------
// | Author: Freedom <961449954@qq.com>
// +----------------------------------------------------------------------
namespace app\common\model\user;

use app\common\model\TimeModel;

/**
 * 积分明细:
 * Class WxUsers
 * @package app\common\model\vip
 * @author Freedom <961449954@qq.com>
 */
class IntegralDetail extends TimeModel{
    protected $deleteTime = 'delete_time';

    public static function onAfterInsert($data){

        //$self = new static();
        $article = self::withoutGlobalScope()->find($data->id);

        $article->withoutGlobalScope()->where('id',$data->id)->save(['app_id'=>self::get_appId()]);

    }

}